package com.smart.pay.web.controller;

import com.qf.common.result.ResponseResult;
import com.smart.pay.web.service.PayService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 *
 */
@RestController
@RequestMapping("/pay")
public class PayController {
    @Resource
    private PayService payService;

    /**
     * 支付方式
     * 1 表示支付宝
     * 2 表示微信
     *
     * @return
     */
    @PostMapping
    public ResponseResult<String> pay(int payType, String orderSn) {
        return ResponseResult.success(payService.pay(payType, orderSn));
    }

}
